package cn.liontalk.proceduce;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author: 周哲
 * @package: cn.liontalk.proceduce
 * @description:
 * @date: 2019/1/10 20:30
 * @version: V1.0
 */
@Component
public class OrderSender {


    @Autowired
    private AmqpTemplate template;

    @Value("${mq.config.exchange}")
    private String exchange;


    /**
     * 发送消息
     * @param message 消息内容
     */
    public void sendMessage(String message){
        template.convertAndSend(exchange,"",message);
    }


}
